<Window x:Class="MimeCloud.AssetManagement.DigitalLibrary.Dialogs.AssetContentTypeEditor"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:System="clr-namespace:System;assembly=mscorlib" xmlns:Interface1="clr-namespace:MimeCloud.AssetManagement.Business.Interface;assembly=MimeCloud.AssetManagement.Business.Interface" Title="AssetContentTypeEditor" Height="300" Width="300">
    
    <Window.Resources>
        <ObjectDataProvider MethodName="GetValues" ObjectType="{x:Type System:Enum}" x:Key="PossibleValues">
            <ObjectDataProvider.MethodParameters>
                <x:Type TypeName="Interface1:TypeOfContent" />
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>
    </Window.Resources>

    <Grid>
        <Border BorderBrush="LightGray" BorderThickness="1" CornerRadius="10" Padding="10">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="100" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>

                <TextBlock Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Text="Content Type Editor" />
                <Label Grid.Column="0" Grid.Row="1" Content="Name" />
                <Label Grid.Column="0" Grid.Row="2" Content="Description" />
                <Label Grid.Column="0" Grid.Row="3" Content="Content Type" />
                <Label Grid.Column="0" Grid.Row="4" Content="Height" />
                <Label Grid.Column="0" Grid.Row="5" Content="Width" />
                <Label Grid.Column="0" Grid.Row="6" Content="Enabled" />


                <TextBox Grid.Column="1" Grid.Row="1" Text="{Binding  Path=Name, Mode=TwoWay, UpdateSourceTrigger=LostFocus, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" HorizontalAlignment="Left" VerticalAlignment="Top" />
                <TextBox Grid.Column="1" Grid.Row="2" Text="{Binding  Path=Description, Mode=TwoWay, UpdateSourceTrigger=LostFocus, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" HorizontalAlignment="Left" VerticalAlignment="Top" />
                <ComboBox Grid.Column="1" Grid.Row="3" SelectedValue="{Binding  Path=ContentType, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" ItemsSource="{Binding Source={StaticResource PossibleValues}}"  IsSynchronizedWithCurrentItem="True">
                </ComboBox>
                <TextBox Grid.Column="1" Grid.Row="4" Text="{Binding  Path=Height, Mode=TwoWay, UpdateSourceTrigger=LostFocus, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True, StringFormat=\{0:c\}}" HorizontalAlignment="Left" VerticalAlignment="Top" />
                <TextBox Grid.Column="1" Grid.Row="5" Text="{Binding  Path=Width, Mode=TwoWay, UpdateSourceTrigger=LostFocus, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True, StringFormat=\{0:c\}}" HorizontalAlignment="Left" VerticalAlignment="Top" />
                <CheckBox Grid.Column="1" Grid.Row="6" Content="" IsChecked="{Binding Path=Enabled, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" />

                <Grid Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="2" Grid.IsSharedSizeScope="True" HorizontalAlignment="Right">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition SharedSizeGroup="Buttons" />
                        <ColumnDefinition SharedSizeGroup="Buttons" />
                    </Grid.ColumnDefinitions>
                    <Button Content="OK" Padding="3.5,0,3.5,0" Margin="3" Click="Button_Click" />
                    <Button Content="Cancel" Padding="3.5,0,3.5,0" Grid.Column="1" Margin="3.5"/>
                </Grid>

            </Grid>
        </Border>

    </Grid>
</Window>
